Electronic structure of substitutional oxygen in silicon