Is it safe to orgasm with a tampon in?

I'm on my period and I don't want to make a mess or get my towels bloody. Is it safe for me to have an orgasm with a tampon in? I'm not talking about penetration I'm just talking about my clit. Any advice?