It's one thing to ask (and I agree with @Buffy that you should), it's quite another to receive a meaningful letter of recommendation. You want to make sure that each letter does its job. If you only get a stock-standard letter that is without detail, effectively stating that the author of the letter had no personal knowledge of your skills and potential for graduate studies beyond that of a subject leader, then this won't make your application packet as effective as it can be.
Let me tell you a story. In the early days of my career, we were assigned undergraduates to advise. The university in which I worked had a stupid rule that stated that advisers were required to provide a letter of recommendation for each of their advisees. Now, I was advising about 200 students. I could identify about ten percent; all the rest appeared as a mass of undifferentiated extracellular debris. I wasn't the only one in this situation. So, how did we get around application time when this great big tidal wave of recommendation letter requests would reach us? We didn't have the time or inclination to compose individual letters for the great majority of our advisees, so we issued stock letters in the following form:
I have known
surname for three years during which time I was his academic adviser. At
university, the academic advisers have the following responsibilities:
During the time I have known
surname was a solid student. I believe that he will be an asset in your
Let me tell you, if you think assessors don't know how to construct and interpret coded language, think again. Such lacklustre references as above don't do much for the application.
If you have limited options as I think you describe, I would ask the professor if he would be happy to sign a letter of recommendation that I prepared. This would allow me (1) to prevent the type of limp reference letter I just demonstrated; (2) to control the amount and frame of the information I wish to present; and (3) to remind the professor of the type of meaningful interaction or effect his or her instruction had on me.
Of course, I would not lie.
Some professor allow this. I have allowed it on the understanding that the student prepares a draft and leaves the rest of the steps -- editing, printing, signing and submission -- to me.