Have you considered getting a blood test? You can get a type specific IgG blood test that will tell you if you have type 1, type 2, or neither.
If your doctor won't do it, you can go to STDCheck.com and get it done through them.
Even if you test positive on a blood test, it still doesn't mean that what you are getting on your anus is herpes. The blood test can help rule herpes in or out, but it could still be a cyst, a hemorrhoid, a fissure, or any number of other things.
If you do have genital herpes, specifically type 2, you could transmit it to your boyfriend. If you have it on your anus, it means it's a genital infection. You can get outbreaks anywhere in the area that boxer shorts cover, generally speaking, and can shed the virus from your mucus membrane skin in that area - your vulva, vagina, anus, the moist, thinner skin.
Taking Valtrex to reduce transmission needs to be taken daily, or at least on the 5 days prior to sex.
I'd start with the blood test. Keep in mind, though, that the hsv2 IgG can have false positives - if your result is less than a 3.5, you'll need to get that confirmed. but we can work through that if it happens.