Oh please, your dog could just as easily get hit by a car while you're walking him down the street or get his head chopped off while hanging it outside a car window. And what about the trailers that pull kids behind bikes? And a 5 lb dog is not going to make your bike off balance any more than a handlebar bag.
If he's docile enough to hang out in a moving basket and not want to jump out, go for it. He'll either be scared or love it.