Ophthalmic compositions and methods for treating eyes