You can. Press Q on keyboard or R3 on gamepad while targeting an enemy. The LOCKED symbol should pop up and your locked target shouldn't change as long as it remains a valid target.