The Fermi fourth catalog of active galactic nuclei (AGNs) data release 3 (4LAC-DR3) contains 3407 AGNs, out of which 755 are flat spectrum radio quasars (FSRQs), 1379 are BL Lacertae objects (BL Lac objects), 1208 are blazars of unknown (BCUs) type, while 65 are non-AGNs. Accurate categorization of many unassociated blazars still remains a challenge due to the lack of sufficient optical spectral information. The aim of this work is to use high-precision, optimized machine-learning (ML) algorithms to classify BCUs into BL Lac objects and FSRQs. To address this, we selected the 4LAC-DR3 Clean sample (i.e., sources with no analysis flags) containing 1115 BCUs. We employ five different supervised ML algorithms, namely, random forest, logistic regression, XGBoost, CatBoost, and neural network with seven features: photon index, synchrotron-peak frequency, pivot energy, photon index at pivot energy, fractional variability, ν
F
ν, at synchrotron-peak frequency, and variability index. Combining results from all models leads to better accuracy and more robust predictions. These five methods together classified 610 BCUs as BL Lac objects and 333 BCUs as FSRQs with a classification metric area under the curve >0.96. Our results are significantly compatible with recent studies as well. The output from this study provides a larger blazar sample with many new targets that could be used for forthcoming multiwavelength surveys. This work can be further extended by adding features in X-rays, UV, visible, and radio wavelengths.