Origin of the optical gap in half-doped manganites