Im not sure how far you are in your development but I would advise using wordpress customizer for theme options. In which case below should work. If not something similar might work.
Never used optiontree, so Im not sure if you are doing something wrong, but it could be because you are calling the function before the OT framework is initialized. In which case, you should move option tree functions to a separate file ‘theme-functions.php’ and call the functions there. Then just require get_template_directory() . ‘/inc/theme-functions.php’ in your functions file after OT init.
My friend thats what I mean, you are probably writing the function before wordpress has initialized option tree framework hence get_option_tree() is an undefined function. Either move it after Option tree is initialized or move it to a separate file and require that file in your functions.php