It doesn't matter if you use "San" or "Santo". Edit: Diccionario Panhispánico de dudas says that "Santo" must be used with Domingo, Tomás, Tomé and Toribio. (Thanks Gonzalo Medina for pointing this out)
The reason to prefer to use "Santo" is to avoid confusion in oral speech. Quoting a WordReference thread:
Technically, any male saint, or "santo", could be called "Santo", and it would not be strictly wrong (although it would be very uncommon) to say "Santo Pedro" or "Santo Juan".
However, the custom for male saints is to abbreviate the title "Santo" to "San".
The exception to this rule is when the first syllable of the name is "To" or "Do". Under those circumstances, if one said "San Tomás", it would be unclear whether the man's name was Tomás or just "Mas" -- because you could be saying "Santo Mas". In the same way, if you said "San Domingo", it would sound very much like "Santo Mingo", and again confusion would result.