How do I control a DC motor with a MOSFET transistor?
Yes, substituting a IRF3205 for the original IRLZ34 should give almost similar results. You mention that you will use this driver to do PWM. There is a problem here, in that the switching of the MOSFet will likely be too slow. This is a result of the gate capacitance Ciss, and gate-to-drain capacitance Crss interacting with that large gate-to-ground resistor (10000 ohm). This will especially be noticed where PWM repetition rates are high. Pulse rise-times will differ from pulse fall-times, usually not-what-you-want when PWM'ing.
In addition, the slow rise &amp; fall times will cause the MOSfet to run hotter than it should.
Note that IRF3205 is a bigger device than IRLZ34, and has roughly 2X Ciss than IRLZ34, so these rise &amp; fall time problems will be worse. These problems can be helped by reducing the 10000 ohm resistor to a lower value - you'll likely have to increase opt-isolator current to compensate. MOSfet gate driver chips are designed to avoid these problems, like TC1411N, among many others.
Icy has pointed out a problem with opto-isolator IRLED drive circuit. In addition, this opto-isolator is a bit slow for PWM use, and its rise/fall times are asymmetrical: 4us/18us with a 100 ohm load resistor substituting for your 10000 ohm resistor. Normally, we expect the PWM pulse widths to be propagated  to the MOSfet switch unadulterated by the pulse drive chain. I'd suggest a faster opto-isolator.