Disable proximity sensor on Nexus 5
I had the same issue recently, it seems the proximity sensor doesn't work properly and it always see there is something near the phone. During the phone call, this will automatically turn off the screen. 

I work around this using the app named "Proximity Screen Off Lite" https://play.google.com/store/apps/details?id=com.itsme4ucz.screenoff

I configure the app as below. 


Screen On/Off Modes
Check "Cover and hold to turn on Screen"
Timeout: 1 second
Check "Disable Accidentla Lock"
Timeout: 4 seconds
All settings 
Check "Disable in Lanscape"
Check "Lock phone on screen ON"
[Advanced] Configure Sensore
Select sensor: Proximity sensor
Value when sensor covered: 0
Value when sensor un-covered: 1


Turn on the service and enjoy your phone calls.

Or

https://play.google.com/store/apps/details?id=com.mobiledirection.proximitysensorreset 

This may help too

Hope it help.