I am in the very same situation, many of the courses I have taken are online courses from a legit UG university. I had done very well in one of my particular online courses and my instructer noted that at the end of the semester. I emailed him back to thank him for his comments and he offered to give me any advise on applying to law school. Long story short I asked him if he would be willing to write me a recommendation (just this wednesday) during our second conversation and he said yes. So, I would advise you to give it a shot, especially if it's from a professor who has attended law school they know the importance of LORs and the whole application procedure and are sometimes more inclined to help. I know mine was.