Screening of a Luttinger liquid wire by a scanning tunneling microscope tip. I. Spectral properties