Yes, you can do it in 2 ways.
By pressing "right shift" while spectating, you will switch "Minimum Mode", that will remove everything but the player names from the view
If you want to remove player names as well, you can open the console (tilde key) and then type
cl_hud 0. Then hit enter.
Don't forget to enter
cl_hud 1 if you want to stop spectating and start playing, otherwise you will have no HUD at all