Hi Amanda,
Using the SAP API's this cannot be acheived. however, it is very simply to customize the code in order to do so.
In javascript all you need to do is get the selected treeItem, and then bind an onClick event that on change selected tree item triggers the click on the icon of the previous selected tree item in order to close it.
This should be simple enough.
BR,
Saar