Electrostatic forces between a metallic tip and semiconductor surfaces