Not only is peeling not needed for potatoes, but in my educated opinion peeling potatoes is not recommended.
As long as you follow proper food etiquette like washing your hands and properly washing the foods before you cook them, as well as cooking at the proper temperature, then you do not need to worry about bacteria.

Make sure to wash the potato well, under water, and preferably with a vegetable brush.
Further, it is unlikely that any bacteria could survive the high temperatures inside an oven anyway.
My last point is that, in my opinion, the skin is the most flavorful part of the potato.
On the other hand, beware of green sprouts on potatoes specifically. Make sure to remove any green sprouts, because they contain a dangerous and potentially deadly toxin called solanine. See this post for more details on the green sprouts: Is it safe to eat potatoes that have sprouted?
History Sidenote:
It's true that in the former USSR it was embedded into the culture to peel potatoes before eating them. However, this was not due to any nutritional danger, because the peels were still used and consumed separately. According to the book "Potato Ontology: Surviving Postsocialism in Russia" by Nancy Ries, on Page 195:
"Family narratives powerfully transmit potato-peeling morality. When I told
her I was writing about potatoes, Marina, an erudite older friend, a Doctor of
Social Sciences, plunged into a war story. She and her mother were evacuated to
Kazakhstan, while her aunts remained in Moscow. When she returned after the
war, the aunts told her their food stories. Always on the verge of starvation, her
aunts did not waste even those dirty, unappetizing peels but saved and mashed them
into pancakes." [Emphasis added.]
So, as you see, even the Soviet USSR, who emphatically peeled potatoes, still ate the potato skins (even the "dirty, unappetizing" ones), so the potato skins were not peeled because they were unhealthy, but rather merely out of tradition.