Yes, it's absolutely fine to approach the prompt like this. There are many ways to tell queer narratives, and there is no reason to exclude allegory.