Generation of frequency-controlled nanosecond and picosecond optical pulses by high-gain parametric amplification