Yes, it’s absolutely safe to place most microwaves in a wood microwave cabinet!
In fact, these pieces of furniture are literally designed for this purpose.
Just be sure to pick one that is the right size for your specific microwave and that still includes enough room for ventilation. You also don’t want the microwave’s vents to be blocked by your cabinet.