You have double tap to wake screen turned on, go into settings, advanced features/ motions and gestures and turn Double tap to wake off, that should fix your problem.
The screen will simply dim while it's on speaker phone, when you use phone on ear, the screen will come on when you want to hang up.