Element Shape Optimization of Planar Periodic Structures