I speak to a few lucky medical school and residency applicants who are asked to write their own letters of recommendation. If you have this opportunity, first, realize that it is not unethical to write your own letter if you’re asked. If you’d like to explore the scruples of this issue, take a look at this New York Times ethicist column about this exact topic.
The mistake I see candidates make in these situations is that they feel awkward about showcasing their accomplishments fully in their letters. If you have this opportunity, write a glowing letter. Be effusive and full-throated in your compliments to yourself. After all, the letter writer can always tone it down if s/he doesn’t agree. But if s/he does, you have bolstered your candidacy tremendously.