Dependence of Tc on the oxygen distribution in the CuO chains in the high temperature superconductors YBa2Cu3O6+x