Structural transitions and superconductivity in (La1-xBax-ySry)2CuO4