Applying brakes can cause a loss of control, so carefully maneuver your bike with a firm grip on the handlebars, without fighting the bike too much. Avoid downshifting or braking until you're at a slower speed, and if you're certain you know which tire is deflated, apply brakes to the other wheel lightly and gradually. The Motorcycle Safety Foundation reminds you that some motorcycles have linked brakes, so keep that in mind when and if you apply the stoppers when you've got a flat tire, since that can unintentionally add brake pressure to both wheels.
Flat tires can be caused by a number factors, including wet weather (which lubricates sharp objects, making them easier to penetrate rubber), and high performance tires (which are stickier than most, and tend to pick up more foreign objects.) Keep in mind that many flats are caused by riding with low tire pressure; this Tire Maintenance Article offers tips on how to ensure your tires stay in top shape.