Don’t use “all my classes are lectures” as an excuse. I teach at our flagship state university. Each year, several students ask me to write a letter of recommendation — whether for grad school or a job or a scholarship.
To those whom I’ve never met, the answer is a flat no. Even if they got the highest grade in the class. That’s because I have no basis on which to assess them beyond that grade, and the grade speaks for itself.
Instead, I save my time and energy for students who came to me early, introduced themselves, told me what their goals were for the class and beyond, engaged fully and prominently during class, came to office hours to engage further, and then asked politely for a reco letter. To them, my response is a hearty “Absolutely!”
Start by sitting in the front row, and then visiting office hours to introduce yourself. It’s really not that hard.