Magneto-optical investigation of the shape anisotropy of individual micron-sized magnetic elements