When attacking a Gym you get to pick 6 Pokemon attackers, but often you only need one. Attacking the Gym with your best Pokemon first will beat up your primary pokemon pretty good, and require the usage of more heal potions. To conserve heal potions, I recommend setting up your attack so that the first 5 Pokemon are "Sacrificial" (Duplicates that you are planning to transfer to the Professor), and the last one is your trump card. The little guys will do a good deal of damage (and occasionally even win! Go Little Guys!) before the ringer comes in to clean up, and will save you having to use Heal Potions. The professor gives one candy per Pokemon transferred regardless of what state they are in, so he doesn't care (Probably just going to use them for his sick experiments anyway).