Certain sexually transmitted infections can be prevented with vaccines. For men who have sex with men we recommend to vaccinate against A and B viral hepatitis. Hepatitis B spreads sexually. Hepatitis A is transmitted during oral sex when people come into contact with fecals.
More information about vaccinations for adults can be found here