Yes. Pretty much anything you can pass during intercourse can also be passed during oral sex. Herpes? Yes. Chalmydia and gonorrhea? Yes. (They're both bacterial and can be cured with antibiotics, but there are more and more cases of antibiotic-resistant gonorrhea so you don't want to mess with it).
HIV can also be passed during oral sex, but oral sex is actually a low risk for HIV transmission (HIV is more easily and commonly transmitted through anal sex and vaginal sex). Syphilis can also be passed during oral sex. As HPV is linked with certain head and neck cancers, HPV transmission during oral sex is now increasingly a subject of more scientific investigation and we need more data on it.
All that said, not a lot of people use condoms or dental dams during oral sex. If STI transmission during oral sex concerns you, consider using condoms or dental dams for it or – at the very least – getting tested for STIs when you have a new partner, or after breaking up with your most recent partner so you can go into your next relationship or hook-up knowledgeable of your STI status.
The same applies to analingus. If your partner has a sexually transmitted infection (STI) such as gonorrhea, chlamydia, herpes, or HIV, you can get that STI from performing analingus (oral-anal stimulation) on him or her. If the person performing analingus has oral herpes (i.e., herpes on their mouth) then he or she can pass it to the person whose anus they're getting up close and personal with. Hepatitis A and B can also be passed through analingus. Fortunately, one can get tested for STIs as well as hepatitis A and B. One can also get vaccinated for hepatitis so that's something to ask your doctor about if you think you might be paying a visit to someone's anus in the near future. Finally, things other than STIs – such as parasites – can be passed during analingus. But much of the time, analingus is fairly safe and uneventful, except for the fun/pleasure part.
How to make analingus safer? Dental dams or condoms cut in half, length-wise, can be used as a barrier between the mouth and anus. Add a touch of water-based lube to the side of the dam/condom that's facing the anus to make things more slippery and pleasurable.
Dr. Debby Herbenick, author of Sex Made Easy and Great In Bed, is the Co-Director of the Center for Sexual Health Promotion in the School of Public Health-Bloomington at Indiana University (IU) where she is a Research Scientist. She is also a sexual health educator at The Kinsey Institute for Research in Sex, Gender and Reproduction where she writes (and hosts audio podcasts of) the Kinsey Confidential column and coordinates educational programming. She has a PhD in Health Behavior from IU, a Master's degree in Public Health Education (also from IU) and a bachelor's degree in psychology from the University of Maryland, College Park. In addition, she is certified as a Sexuality Educator from the American Association of Sex Educators, Counsellors and Therapists.