In wireless sensor networks (WSNs), virtual backbone has been proposed as the routing infra-structure and connected dominating set has been widely adopted as virtual backbone. However, since the sensors in WSNs are prone to failures, recent studies suggest that it is also important to maintain a certain degree of redundancy in the backbone. To construct a robust backbone, so called k-connected m-dominating set has been proposed. In this research, we propose an integer programming formulation and an optimal algorithm for the minimum k-connected m-dominating set problem. To the best of our knowledge, this is the first integer programming formulation for the problem, and extensive computational results show that our optimal algorithm is capable of finding a solution within a reasonable amount of time.