Is there any way to stop boarded enemies from being able to open my ship's doors? I currently have not found any means of 'trapping' them.
Upgrading your Doors subsystem will improve your doors to Blast Doors, which slow down the spread of fire and require enemies to break them open before they can pass through; a higher level means they can contain fire and enemies even better. In Advanced mode, you can temporarily upgrade the subsystem by having a member of your crew man the Doors control panel on your ship.
You can use a Crystal crewmember's Lockdown ability to block all doors to the room the crewmember is in for a limited period of time.