Blood flow simulations can be improved by integrating known data into the numerical simulations. Data Assimilation techniques based on a variational approach play an important role in this issue. We propose a non-linear optimal control problem to reconstruct the blood flow profile from partial observations of known data in idealized 2D stenosed vessels. The wall shear stress is included in the cost function, which is considered as an important indicator for medical purposes. To simplify, blood flow is assumed as an homogeneous fluid with non-Newtonian shear-thinning viscosity. Using a Discretize then Optimize (DO) approach, we solve the non-linear optimal control problem and we propose a weighted cost function that accurately recovers both the velocity and the wall shear stress profiles. The robustness of such cost function is tested with respect to different velocity profiles and degrees of stenosis. The filtering effect of the method is also confirmed. We conclude that this approach can be successfully used in the 2D case.