An optimization approach for large scale simulations of discrete fracture network flows