Optical parametric oscillator with quantum memory for quantum repeaters