Electronic structure of transition metal tips and tip-surface interactions