As you progress with lab assistant quest you will be able to enter in a dungeon. You can find the pills there in every run, there is a boss at some floors, sometimes you will find some labs that you can scrap for pills and there is a npc with a chance to sell them as well.Is there another way to obtain transformation pills and scan them than beating up those who have them and after beating up someone who got forced to eat one?
You can make your character eat the pills and get scanned.
Also you can give the pills to your slaves, wait a bit and then taking them to the medbay. When you are having fun with them there is an option to give drugs.