Of course you can!
It depends of the ROM base you're using too. I will explain how works in Fire Red (im FR hacker, i don't know how it works or if its the same method in other bases).
There's one special which let's you do this, concretly the $163. It will register the pokémon you setted in the var $8004. An example to register Bulbasaur:
Code:
setvar 0x8004 0x1
special 0x163
If u want to register the first 151 pokémon, then i recommend u to use a loop to save space and make it more comfortable (don't forget to enable the pokédex with the 0x829 flag!).
See ya! Miau revoir~.
PD: If you need some help with the loop tell me, but it's pretty easy.