It's "ok" if you are ok with it, but just go in with realistic expectations. Know that when submitting to a publisher directly you will most likely have to wait much longer for a reply (I've heard stories of pubs that took over a year to send a form rejection), and you will most likely not get as good a deal as you would with representation.
Also, be sure to check the publisher's guidelines for unsolicited submissions, as it could be the difference between getting your manuscript read and getting it tossed right into the trash.