Given the increasing scholarly interest in the role Twitter bots play in polarizing public discussion and spreading misinformation, bot detection has become particularly important from both academic and public policy perspectives. Although a number of attempts have been made to date to develop bot detection technologies, their applicability in social science research remains limited due to issues of transparency, replicability, flexibility, scalability, and suitability for retrospective analysis. In this paper, we address these limitations and propose a new supervised learning based methodology of bot detection that integrates state-of-the-art transfer learning and network embedding techniques. We utilize the RoBERTa language model and the Scalable Incomplete Network Embedding (SINE) model to extract informative textual and network features for the purpose of bot detection on the development set, and use these features to train and cross-validate probabilistic classifiers on the training set. We build an ensemble classifier using Bayesian model averaging on top of these individual probabilistic models. We illustrate our methodology by detecting and evaluating the role of bots in a large collection of political tweets posted during the 2016 US presidential election campaign. Our methodology can, however, be reproduced and tailored to other contexts of interest.