Just 50 miles across the Gulf of Finland from Helsinki , Tallinn has one of the best preserved Old Towns in northern Europe , with red-roofed castles , metal-tipped spires and weather-worn alleyways that date to the Middle Ages .