Is the fan a/c or d/c? The transformer is a/c unless it's got a bridge or some diodes etc. If the transformer is d/c then you can use a voltage regulator very easily to reduce the voltage to 12. If it's a/c then you'll have to use resistors. Eitherway it's got to match the fan motor.