Do you think it is possible to see all of these in that short period of time?
Yes, but you will need to be efficient since all of those sights close well before 11 p.m. Check the websites and note the prayer times for the day of your visit - you cannot enter a mosque about an hour before prayer time, during prayer time, and about a half hour after prayers. As was noted, people need to wear appropriate attire (no shorts, no bare shoulders) and women need a head scarf in Blue Mosque. Hagia Sophia is now a fee-based entry to second floor (not the mosque area) so you'd need to check about any restrictions there.
Given your limited time, I might choose either the Grand Bazaar or the Spice Market (but not both). They're very crowded places.
How far is the port from these sites?
Is there a bus/shuttle that will take us there?
Answered by others. I also recommend you consider the ship's excursion or finding a private guide. SRM Travel is the company RS uses for tour guides in Turkey and they do offer cruise excursions. However do note that some people have had recent difficulties contacting the company, so try getting a hold of them right away in case that is still an issue. There have been recent posts in this forum asking and commenting on private guides in Istanbul, have a look and see if there is someone that works for you.
Is it safe to do this on our own?
Absolutely. Take the usual precautions you would in any big city, as pickpocketing on the trams does happen (e.g. use a money belt or under-clothing method to stow your passport/money). I felt completely safe and very welcome there. Note that you will be approached by all manner of people asking to show you their carpet/spice/gift shops. It's perfectly fine to say no thank you and move on.
Is there a walking tour that we could do on our own?
The RS Istanbul guide has several self-guided walking tours.
Will we need currency other than euros?
Smaller vendors and restaurants will probably not accept Euros, so you may need to use a credit card or go elsewhere. Ask about payments before you sit down to order in a restaurant. Read up on how to use the trams if you plan to use mass transit - sometimes it can be a challenge to get tickets using a credit card at the machines.