I'm going to write gay fan fic/rp while married
Most people don't indulge in fan fiction while married.
I know they don't, but I'm an exception
If that is what you prefer to write then that's fine. Writing erotic material isn't cheating, after all.
I love reading stories about guys having gay sex together. Writing stories about them is just my way of indulging my sexual fantasy.
It's fine to have your own sexual preferences, even if your spouse doesn't fully share them.  However, you should let your spouse know that this hobby is just a creative outlet for you, and it is not a substitute for the love and intimacy that you have for one another.