In IEEE 802.1Q with Time-Sensitive Networking (TSN) extension, the timing constraint is enforced by providing deterministic transmission policies when both Real-Time (RT) and Non-Real-Time (NRT) streams are transmitted. The transmission of non-preemptive NRT streams may, however, unexpectedly intrude into the next time slice of RT streams, thus jeopardizing RT streams' timing constraints. Guard bands are therefore introduced to prevent such negative influence by inserting a duration in front of every time slice that contains RT streams, but one major disadvantage is wasting bandwidth in resource-limited networks. Several methods have been proposed to reduce guard bands by aggregating time slices to tackle the above problem. However, there is still room for improvement in reduction. Therefore, this paper proposes an optimized TSN scheduling synthesis for RT streams in IEEE Standard 802.1Qbv with a global perspective to efficiently reduce guard bands. We add a constraint to avoid creating extra guard bands during scheduling generation and an objective function to minimize the maximum number of guard bands. Due to the general constraints and objective function, our proposed method can also apply to streams with multiple periods. In the performance evaluation, we show that the proposed approach effectively reduces guard bands while achieving an average improvement of up to 38.6% against the state-of-the-art.