Certified Guidance for Planning with Deep Generative Models