yes, but requires complex and fail-safe switches, because if it is possible to ever connect both shore power and the inverter at the same time, some dummy will do it and MAJOR damage WILL happen. We are talking here about the possibility of your inverter exploding in flames with a shower of sparks and vast clouds of smoke.
You will need at the very least a double-pole, double throw switch with the outlet(s) on the center pole that gets switched to either the inverter or the shore power, but cannot be set to connect inverter and shore power at the same time.