Yes, you can have anal herpes if you have anal sex. To avoid this, practice safe sex by using a condom.