Quantum Metropolis Solver: a quantum walks approach to optimization problems