I'm sure the LOR will matter to a certain extent especially since the grades alone don't fully reflect a student.
But at the same time, if you didn't make the effort to get a great letter from the professor, you don't deserve a great letter. You said it yourself; professors don't know you. They can't write about you if they don't know you.
I worked as an adjunct for 6 years writing many letters and also communicated with higher end professors in regards to writing letters. If you don't make the effort to get yourself known to the professors throughout the semester, you are not going to get a great letter. As a matter of fact, we can either only write a generic letter since we don't know much about you (being nice and you are lucky), or not write one at all. The quality of letters change for students who have frequently visited for chats, help, etc compared to students who I have never cared, seen, or chatted with. I would write an amazing letter for a B student who I know a lot about compared to an A student who I know nothing about besides the grade.
As above replies said, however, if your grades are much higher than the average, I wouldn't worry too much about it.