Joint Verification and Refinement of Language Models for Safety-Constrained Planning