The so-called regularized Biot-Savart laws (RBSLs) provide an efficient and flexible method for modeling pre-eruptive magnetic configurations of coronal mass ejections (CMEs) whose characteristics are constrained by observational images and magnetic-field data. This method allows one to calculate the field of magnetic flux ropes (MFRs) with small circular cross-sections and an arbitrary axis shape. The field of the whole configuration is constructed as a superposition of (1) such a flux-rope field and (2) an ambient potential field derived, for example, from an observed magnetogram. The RBSL kernels are determined from the requirement that the MFR field for a straight cylinder must be exactly force-free. For a curved MFR, however, the magnetic forces are generally unbalanced over the whole path of the MFR. To minimize these forces, we apply a modified Gauss-Newton method to find optimal MFR parameters. This is done by iteratively adjusting the MFR axis path and axial current. We then try to relax the resulting optimized configuration in a subsequent line-tied zero-beta magnetohydrodynamic simulation toward a force-free equilibrium. By considering two models of the sigmoidal pre-eruption configuration for the 2009 February 13 CME, we demonstrate how this approach works and what it is capable of. We show, in particular, that the building blocks of the core magnetic structure described by these models match to morphological features typically observed in such type of configurations. Our method will be useful for both the modeling of particular eruptive events and theoretical studies of idealized pre-eruptive MFR configurations.