i) The Panim Yafos answers: Rabbi Yishmoel was in a house with a roof, and he was anyway tamei via tumas ohel [impurity due being in the same tent as dead body], and being that he was already tamei, there was no problem to touch the head of Rabbi Shimon.
ii) The Hafla’ah answers based on Tosfos in Kesubos (103b). Tosfos quotes Rabbeinu Chaim who says that if he was around when Rabbeinu Tam died, he would have become tamei to help bury him. He cites proof from the Gemara which says:כשמת רבי בטלה קדושה - “When Rebbi passed away, there was no kedusha in the world” and Rabbeinu Chaim understands to mean there was no din of kedushas kehunah that day, as when a Nasi dies even Kohanim are allowed to become tamei to bury them. We see from here that out of kavod for a Nasi a Kohen may become tamei. According to this, for any Talmud Chocham on the level of Rabbeinu Tam, a Kohen may contaminate himself to help with the burial. Therefore, certainly Rabbi Yishmoel was able to become tamei for Rabbi Shimon.
However, the Reshash in Kesubos learns that peshat in Rabbeinu Chaim was because of the fact that tzadikim are not metamai, and according to this it depends on the regular old machlokes if tzadikim are metamai.
iii) R’ Shlomah Zalman Auerbach (cited in Halichos Shlomah on Tisha B’Av, Perek 15, pg. 437, Orchos Halachah 31) writes: By kissing Rabbi Shimon, Rabbi Yishmoel delayed his own death. He was about to be killed, and he asked if he could first have the head of Rabbi Shimon. By taking Rabbi Shimon’s head, he delayed his death for a few moments, and one may violate the entire Torah to stay alive even for a short amount of time.
iv) R’ Shamai Gross answers: Tosfos in Nazir (47a) writes that by a mes mitzvah a Kohen may become tamei, even if he isn’t going to bury the dead body, but is simply moving it from the sun to the shade. Therefore, we can say: Rabbi Shimon was a mes mitzvah as he had no one to bury him, and Rabbi Yishmoel moved him due to kavod hames and to save him from lying in disgrace. Rabbi Shimon was lying there in disgrace, and Rabbi Yishmoel came along and moved him and kissed him, and gave a hesped, to save him from lying in disgrace.