A South African magistrate has decided Olympic runner Oscar Pistorius can leave jail while he awaits trial for the murder of his girlfriend.