Event receiver to prevent adding item throught object model/web services or UI.
One solution would be to use event receiver and, if document is being added in root folder, just cancel adding document, but that would transfer user to error page. This solution is not user friendly.
Just hide the option to add new items
The other one would be to use javascript to hide new button document and upload document buttons. It's easy when you integrate SharePoint with jQuery.
Hide New Button
var newMenu = $('a[id$=NewMenu]').parents('.ms-toolbar') //Hides New button
if (newMenu[0] && newMenu[0].nextElementSibling.className == 'ms-separator')
newMenu[0].nextElementSibling.style["display"] = "block" //Hides seperator between new button and next button.
But you probably would not like to completely hide the new button, but to leave creating new folder option.
$('ie\\:menuitem[id*=New]').not('[id$=NewFolder]').remove()
Hide Upload Menu
var uploadMenu= $('a[id$=UploadMenu]').parents('.ms-toolbar') //Hides New button
if (newMenu[0] && newMenu[0].nextElementSibling.className == 'ms-separator')
uploadMenu[0].nextElementSibling.style["display"] = "block" //Hides seperator between new button and next button.
Ahh, forgot the (al)most important: check if you are on the RootDirectory.
var rootFolder = $.url.decode(getParameterByName("RootFolder"))
if (rootFolder && ctx && rootFolder.replace($.url.decode(ctx.listUrlDir+"/"),"").length == 0 ) {
..Do code above..
}