How to ask for a recommendation letter?
I have no knowledge of you, your university or the staff that taught you; however, despite what most students believe most academic staff are extremely professional. Their position requires it of them.

When I and my colleagues provide a reference (our equivalent of a letter of recommendation) we base  it on the facts checked from the student records. We would check the transcripts look at the attendance records and other material on file (such as disciplines, warnings), we would note late submissions of work and other statistical details. From that we would build up a picture of the student as a scholar and use that as the basis for a recommendation.

It would be unprofessional to just base such a recommendation on a memory of a previous meeting, and incident in class. Actually, with so many students passing through over the years individuals rarely remain in the memory unless they were remarkably outstanding in a positive or negative sense (i.e. one in a million).

We aim to write accurate and factual references to our sister institutions in a manner that we would expect to receive them for our own applicants. We would expect the references supplies to us similarly written in a detached and professional manner.

All you can do is ask. You need letters of recommendation. The only way to get them is to ask. Although you might have matured and learned a professional approach, don't forget they had to also do this to gain their own position, and will continue to do so.

Your mileage may vary, but I can only give my opinion from my experiences of supporting students every year in their quests for future success.