Training LLM-based Tutors to Improve Student Learning Outcomes in Dialogues