Is there a way to stop receiving iMessages on OS X when the Messages application is closed?
Yes, you can achieve your desired behavior without disabling Messages on your Mac.

If you turn off notifications for Messages from within System Preferences, you will still receive the messages, but will not be notified that they came in.

You can turn notifications off on the following screen.  Simply click on "None", and deselect all the checkboxes, as illustrated below: