Yes, that is fine.
Having an SSD is a bonus but both it and the CPU will generate heat. Plus your graphics subsystem, esp under heavy load.
The main concern is that having the top closed may impede airflow that is expected to come in through baffles above the keyboard or around it.
Plus, your fan will have an output on the side edge somewhere which must not be blocked.
One rule of thumb I use is that if the computer is operating at a temperature that you would not be comfortable in yourself, then it is too hot.
I am doing something very similar, and the only concession I have had to make is to keep the lid cracked a bit for air inflow, and to keep the left side clear for the outflow.
Is that blocking any vents? – Journeyman Geek – 2017-05-14T14:19:13.450
2Yup! As long as it's got room to breathe, that's perfectly fine. Hard drives and fans are the only mechanical parts in a laptop (besides your dormant cd drive). And fans don't care much what direction they're oriented, much less all the other components. – Blaine – 2017-05-14T14:34:16.720
Provided you maintain a minimum of 1" clearance between the bottom of the laptop and the wall, you'll be fine. You can go closer, but you'll likely experience the fans running at higher speeds more often than normal. – JW0914 – 2019-10-01T11:58:42.777