A spectroscopic investigation of the lattice distortion at substitutional sites for groups V and VI donors in silicon