case.
What’s the story here? Did someone ask you to write a letter? Or did you volunteer?
The short answer to your question is, if you write a character letter, there’s about a 100% chance you’ll be called to testify at some point. Also, if you’re afraid of your name being known, writing the letter is no different from testifying. Your name will be out there either way.
Also, what country are you in? I’m assuming you’re describing the United States, but this doesn’t sound like the United States.