Mix five parts water and one part bleach. The U.S. Forest Products Laboratory recommends this concentration (at most) to avoid damaging wood surfaces. If you use bleach too highly concentrated, it can permanently discolor or even damage your wood.
Sponge the bleach solution onto your wood beam and scrub the wood with either your sponge or a separate scrubbing brush. For mold and mildew, use a brush to give yourself added leverage, since bleach does not easily penetrate porous materials on its own. Wait about 15 minutes for the bleach to work.
Add about 1 teaspoon of powdered detergent to your bleach solution if the diluted bleach alone fails to remove the dirt or mold from your wood beam. Do not use liquid detergent, as it may react negatively with the bleach and create toxic fumes. Scrub your wood beam a second time.
Rinse your wood beam with clean water applied to a sponge. The less liquid you use, the easier it will be to dry the wood beam. Wring out your sponge before rinsing. Never scrub wood with a dripping sponge, since saturating wood may lead to new or increased mold growth.
Dry your wood beam. Assuming you limited your use of moisture, you should have no problem drying the wood with a nice flow of air circulation. For instance, point one or two fans at the beam until the wood dries. Alternately, use a dehumidifier or turn on your central heater.