maybe there's other solutions that im not thinking of right now, but i'm just saying the first thing that comes through my mind:
if you really want to confine your lightspot between the green lines, with a hard contrast between light and shadow (i.e.: not slowly fading on the edges), try the following:
make 2 brushes and place them in such a way that they block the light that you dont want, but do not block the light that you do want, i.e. place them around the opening of you lampsocket, but not in the opening. now cover all sides of the brushes with the "blocklight" texture. do not make them into entities, keep them world brushes. Have the lightspots have a wide enough angle, such that enough light slips between the brushes, but not too wide to surpass your brushes.
ingame, you wont see the brushes, but they will confine the light within the green lines! if you're not sure on how to place them, give me a yell and i'll draw you