Which Optiplex model do you have?
The boards are usually standardized (ITX, mATX etc), so could be transplanted.
Dell typically use all-in-one connectors for the front panel etc though, so wiring up power switches etc can be a little tricky. Not impossible, but can take a bit of time/trial & error.