Adding a mask to a light source?

I have created a mesh that is a light, I’d like the light to cast a specific shape. Is it possible to create a mask that I apply to a light actor so it uses the shape I want?