The substrate-node-template uses Aura for block authoring. In Aura time is divided up into "slots" of a fixed length. During each slot one block is produced, and the authorities take turns producing blocks in order forever.
In Aura, forks only happen when it takes longer than the slot duration for a block to traverse the network. Thus forks are uncommon in good network conditions.
Because Substrate provides a modular framework for building blockchains it is possible to build a custom consensus model.
And example of what you want to implement is Substrate contracts node, that uses Instant seal.
With Instant Seal, the node will automatically authorise the block the second it gets a transaction. It will not create the empty blocks on the chain.
As an example of how to migrate from Aura & Grandpa (What node-template uses) to use instant-seal you can take a look in this PR on the Substrate Contracts Node: Changed consensus to manual-seal
You can read more about Consensus System in Substrate Docs and specifically the node-template in this StackExchange question: What are current and finalized blocks in the substrate blockchain node template?.