Prompt Optimization with Logged Bandit Data