The routing and wavelength assignment with protection (RWA-P) is an important problem in telecommunications. Given an optical network and incoming connection requests, the problem aims to grant maximum number of requests by assigning lightpaths at minimum network resource usage level, while ensuring the provided services remain functional in case of a single-link failure. We consider a practically relevant case of RWA-P where alternative lightpaths for requests are assumed to be given as a precomputed set, and show that it is NP-hard. We formulate RWA-P as an integer programming (IP) model, then use it as a foundation to develop a novel quadratic unconstrained binary optimization (QUBO) model. Moreover, we present conditions on model parameters to achieve a desired objective prioritization, and to ensure the exactness of the QUBO model. We use a new technology, Digital Annealer (DA), to solve the QUBO model, and compare it with three different alternatives that employ GUROBI, namely providing the models directly to the solver, and applying a branch-and-cut method. We conduct computational experiments on a large suite of instances for performance comparison and sensitivity analysis on model parameters. The results show that the emerging solution technology DA outperforms or is comparable to the established techniques coupled with the state-of-the-art solvers in addressing the need of generating high-quality solutions quickly.