A serious, all-encompassing, and deadly cancer that affects every part of the body is skin cancer. The most prevalent causes of skin lesions are UV radiation, which can damage human skin, and moles. If skin cancer is discovered early, it may be adequately treated. In order to diagnose skin lesions with less effort, dermatologists are increasingly turning to machine learning (ML) techniques and computer-aided diagnostic (CAD) systems. This paper proposes a computerized method for multiclass lesion classification using a fusion of optimal deep-learning model features. The dataset used in this work, ISIC2018, is imbalanced; therefore, augmentation is performed based on a few mathematical operations. After that, two pre-trained deep learning models (DarkNet-19 and MobileNet-V2) have been fine-tuned and trained on the selected dataset. After training, features are extracted from the average pool layer and optimized using a hybrid firefly optimization technique. The selected features are fused in two ways: (i) original serial approach and (ii) proposed threshold approach. Machine learning classifiers are used to classify the chosen features at the end. Using the ISIC2018 dataset, the experimental procedure produced an accuracy of 89.0%. Whereas, 87.34, 87.57, and 87.45 are sensitivity, precision, and F1 score respectively. At the end, comparison is also conducted with recent techniques, and it shows the proposed method shows improved accuracy along with other performance measures.