From the FAQ of the Tolkien Estate's website:
Is it possible to write stories that are set in Middle-earth?
The short answer is most definitely NO!
We understand only too well the fascination and enjoyment that the world of Middle-earth can bring, but the fact remains that this is an imaginary world, created by the author on his own terms and in his own right. So, however tempting, to publish this type of fan-fiction for personal or commercial purposes, even online, is absolutely not authorized.
In the era of the Internet, with people selling ‘homemade’ literary works on websites all over the world, it must be unambiguously stated that the Tolkien Estate has never authorized the commercialisation or distribution of such material, and has no intention of doing so.
The Tolkien Estate’s mission is to defend and protect the integrity of J.R.R. Tolkien’s works. As literary executor, it has always been Christopher Tolkien's goal to publish the writings of his father—both finished and unfinished—in the most faithful and scrupulous way, without adaptation or embellishment.
Until such a time as Middle-earth is in the public domain1, the odds of being granted a licence to produce literary works in Middle-earth are slim to none.
Whether or not this will change after Christopher Tolkien's death is unknown, and depends on who he appoints to be the literary executor.
While not strictly what the question is asking, the Tolkien Estate has given their blessing to scholarly-type works by other authors.
The prime example that springs to my mind is The History of the Hobbit, written by John Rateliff and first published in 2007. The book is a historical analysis of The Hobbit, similar in style to the History of Middle-earth series. Although not actually written by him, Christopher Tolkien reportedly read the final draft of the book and gave it his blessing.
1 Disclaimer: top-voted answer is mine