Solitons in periodic nonlinear optical media