While making a decision, you should try to find out what your pet is comfortable with. If your dog is comfortable with bike carrier/backpack, then go for it. If not, try alternate methods like transporting the dog in a car. Also, you have to consider the safety of the people as well.
To be honest this is a tough one not knowing what size dog, or what size bike. I am assuming that this is a small dog. Less than 15 lbs. And the bike a mountain bike. I have found several quality back packs for dogs.http://www.google.com/url?sa=t&source=web&cd=2&sqi=2&ved=0CDcQgwgwAQ&url=http%3A%2F%2Fwww.amazon.com%2FCamo-Backpack-Carrier-Dogs-Pounds%2Fdp%2FB000NZWULO&rct=j&q=dog%20carrying%20backpack&ei=vpZHTYX-EcH-8AbE_fiFBw&usg=AFQjCNG6V64ArNj0Vz78wTknzm3UTQzjUQ&cad=rja
you can follow this link and you will find everything you are looking for.