Learning-Based Optimal Control with Performance Guarantees for Unknown Systems with Latent States