Chaos in nonlinear optical systems