Spatial confinement of acoustic and optical waves in stubbed slab structure as optomechanical resonator