Solution and properties of the restricted total least squares problem