Analysis of short range forces in optomechanical devices with a nanogap