A dielectric structure with effective permittivity and permeability close to -1 operating for propagative waves at optical wavelengths is proposed. This structure is a two-dimensional photonic crystal with refractive index -1, coated by appropriate antireflection gratings. Numerical simulations involving a flat lens made of this optimized crystal illustrate the improvements that antireflection gratings can bring. In particular, following Veselago's proposition, this lens "can focus at a point the radiation from a point source" with negligible reflection losses. The proposed design takes into account the fabrication requirements and can be used for optical devices integrated in planar waveguides.