Error : Only variables should be passed by reference
The error is because you're trying to directly pass menu_tree_output() function return value to drupal_render() function. Which is not allowed because drupal_render() accepts $element as call by reference. When accepting arguments as call by reference those must be passed as variable (preferred).

So your code should look like below:

&lt;nav&gt;
  &lt;div class="container"&gt;
    &lt;!-- Collect the nav links, forms, and other content for toggling --&gt;
    &lt;div class="collapse navbar-collapse" id="main-nav"&gt;
      &lt;ul class="nav navbar-nav navbar-right"&gt;
        &lt;?php $menu_output = menu_tree_output(menu_tree_all_data('menu-top-menu')); ?&gt;
        &lt;?php print drupal_render($menu_output); ?&gt;
      &lt;/ul&gt;
    &lt;/div&gt;&lt;!-- /.navbar-collapse --&gt;
  &lt;/div&gt;&lt;!-- /.container --&gt;
&lt;/nav&gt;