If a tire goes flat while riding and you must stop, it is usually best to:

If one of your tires fails, hold the handgrips firmly and begin to slow down by easing off the throttle while maintaining a straight course. If you must brake, gradually apply the brake of the tire that is still good, if you are sure of which tire that is. Edge toward the side of the road as you slow down, squeeze the clutch, and stop.
DMV Writen Test