is it ok to manually remove menu_links entries from db?
The menu_links table contains a lot of automatically generated rows. These come from the hook_menu() implementation of modules. Deleting these rows will likely result in them returning on the next time you clear the cache, because menus will be rebuilt than and the systems scans through all hook_menu() implementations adding new links.

If you look closely at the menu_links table, you'll notice there is a boolean field hidden. A value of 1 tells Drupal not to show this item in menu's.

So you can either filter out all hidden items (you only need hidden = 0 since the value -1 represents a menu callback), or you can have a look at the Drupal menu functions. There are a lot of functions with menu and tree, but if I am not mistaken you are looking for menu_build_tree.