How can Aoshi Shinimori walk/run/fight when he got shot in both legs?
While bullet wounds can be very dangerous, according to this Wired article by a combat medic, they can also be relatively trivial. The author retells the story of a man shot in the chest and neck six times who remained fully alert and responsive, and survived. According to Wikipedia, "depending on the extent of injury, management can range from superficial wound care to limb amputation." A bullet to the leg could shatter your femur, or it could cause so little damage a doctor would just slap a bandage on it (assuming the bullet passed through).

Moreover, a man like Aoshi would likely have trained in martial arts pain management techniques. Aoshi may well feel pain from his injuries during the Kyoto arc but could ignore it.