Yes, you can. There are several ways to do this.
Terraclor, Iprodione, and Mefenoxam are examples of chemicals that can treat the soil. Check the labels to see what fungi it controls and how to apply.
Some organic gardeners pretreat large gardens areas by heavily soaking the ground with water, then covering the garden area for 4-6 months. The heat and humidity kill spores as well as weeds.