It's current rather than voltage that produces electrolysis. The voltage is determined by the particular chemical reaction involved, so you need enough DC voltage for that particular reaction, and a means to control the current. If you don't control, or somehow limit, the current, the reaction can consume an enormous amount of energy with potentially very unpleasant consequences.
Also, you could easily overload the transformer. If you do, it will get very hot and give off a lot of very undesirable chemicals, and it might start a fire.
Current could be controlled by an electronic device. A DC power supply with an adjustable current limit or a constant current output would work, or it could be controlled with an old-fangled rheostat in series with the electrode circuit. You'd definitely want to include an ammeter in the circuit to monitor the current.