Just be honest with them, say that you need those recommendation Letters to ''access a higher level of education'' (teachers love that

) and remember most likely those teachers were somehow in your situation back then so dont worry , if you had a good grade on that topic make a quick reference to that(stay modest and humble) otherwise emphisize the fact that you were motivated about learning and also improving your knowledge in that particular subject, dont bs them too much play the honesty card

you would be surprised how many letters I got this way (regardless of the grade

) good luck