In the present work, a hybrid beam element based on exact kinematics is developed, accounting for arbitrarily large displacements and rotations, as well as shear deformable cross sections. At selected quadrature points, fiber discretization of the cross sections facilitates efficient computation of the stress resultants for any uniaxial material law. The numerical approximation is carried out through the lens of nonlinear programming, where the enengy functional of the system is treated as the objective function and the exact strain-displacement relations form the set of kinematic constraints. The only interpolated field is curvature, whereas the centerline axial and shear strains, along with the displacement measures at the element edges, are determined by enforcing compatibility through the use of any preferable constrained optimization algorithm. The solution satisfying the necessary optimality conditions is determined by the stationary point of the Lagrangian. A set of numerical examples demonstrates the accuracy and performance of the proposed element against analytical or approximate solutions available in the literature.