Device-to-device (D2D) communication is a promising technology towards 5G networks. D2D communication can offload traffic using licensed/unlicensed band by establishing a direct communication between two users without traversing the base station or core network. However, one of the major challenges of D2D communication is resource allocation and guaranteeing quality-of-service (QoS). In this paper, we establish an optimal queuing scheduling and resource allocation problem for three-tier heterogeneous network based on LTE Wi-Fi aggregation, to offload voice/multimedia traffic from licensed band to unlicensed band using scalable MAC protocol (SC-MP) under various static delay constraints. The access mechanism used for Wi-Fi in SC-MP is point coordination function, which further offloads the multimedia traffic using D2D communication in unlicensed band. Resource allocation and optimal joint queuing scheduling problems are formulated with diverse QoS guarantee between licensed and unlicensed band to minimize the bandwidth of licensed band. Furthermore, an iterative algorithm is proposed to express the nonconvex problem as a series of subproblems based on block coordinate descent and difference of two convex functions (D.C) program. We have simulated the proposed scheme using two scenarios: Voice traffic using licensed band and voice traffic using both licensed and unlicensed band, whereas multimedia traffic uses unlicensed band for both the scenarios. The simulation results show that both the schemes perform better than the existing scheme and scenario 2 outperforms scenario 1.