I think that in order to convince your teacher to allow you gain community service, you must be honest. Your letter needs to give specific reasoning why you need the community service, why you would like to have him/her sponsor the community service, and how the act of you completing community service will benefit you and the need to complete it.
Your honesty will be the most convincing attribute of your letter. You need to be honest so that your teacher can see why this opportunity is important. You may also wish to give your teacher some information as to why you are required to complete community service in the first place.
By doing this, you are essentially admitting that you are willing to face the consequences of actions made (if you are facing community service for getting in trouble) or because you simply wish to make a difference in your community. Either way, it would be my hope that your teacher could come to understand how important this is to you.