Agreeing with the poster above, I would ask for a letter this coming Spring or at least a few months later, rather than tomorrow. Don't be too direct. Understand that he is very busy and might not be able to write a letter. Respect his obligations and time. This general attitude will take you a long way, because in this way, you are treating him as a mentor or even a colleague, rather than as someone who just does a favor for you.
Emphasize that you enjoyed the class and learned a lot. Maybe you can ask for what other classes the professor is teaching or other classes he would recommend. You can also ask about his research and how it might relate to the class. Also the professor might be an adviser for a student organization, and he might be a frequent guest speaker during its meetings. Or maybe you have questions just out of curiosity after the whole class materials are finished.
You can mention your futue career plans and he might have questions about you too.
Treat your professors like your parents who want to support you, respect you, and help you succeed. Having a conversation with them might become easier.