Optimal control of spore-driven disease