If you have the phone set to lock when you turn the screen off, tap the power button. Otherwise I don't think you can. (The screen should go dark when the phone is near your face, anyway, to prevent "cheek dialing". If it doesn't, either something is blocking the proximity detector or the detector is defective.)