This paper deals with the trajectory tracking problem of a quadcopter system through a two-layer optimization-based control strategy. The top layer controller employs the MPC (Model Predictive Control) method making use of the linearized translation dynamics in order to achieve the thrust and the sets of the reference angles. The lower control layer considers a combination of feedback linearization and optimization-based control. To design a CTC (Computed Torque Control) law, the nonlinearities of the rotational dynamics are discarded, leading to a controllable linear model which is further used in an MPC framework for angle tracking. Simulations and comparison results for quadcopter trajectory tracking prove the benefits of the proposed multi-layer optimization-based control approach.