Optical rogue waves generation in a nonlinear metamaterial