How can I use custom menus with a Bootstrap WordPress theme?

You can change the classes of the <ul> by adding 'menu_class'=>'nav navbar-nav' to your $args array. Remember, this parameter overwrites all the classes, so add “menu” as well if you want many themes and plugins to work!

If you don’t want the outer <div>, you can “unwrap” the <ul> by adding 'container'=>false.

$args = array(
    'theme_location' => 'primary',
    'menu_class'     => 'nav navbar-nav',
    'container'      => false,
);

See the full reference here.