Thanks for your question. It’s great that you’re thinking about how to have safer sex. Based on current research, if your partner takes HIV medications and he has an undetectable HIV viral load, then you will not get HIV from him during sex. That said, it’s recommended to use condoms with anal sex to prevent other sexually transmitted infections (STIs).
The Centers for Disease Control and Prevention has more information about how to prevent getting HIV from sex. (https://www.cdc.gov/hiv/basics/hiv-prevention/protect-yourself-during-sex.html)