Using deep learning has demonstrated significant potential in making informed decisions based on clinical evidence. In this study, we deal with optimizing medication and quantitatively present the role of deep learning in predicting the medication dosage for patients with Parkinson's disease (PD). The proposed method is based on recurrent neural networks (RNNs) and tries to predict the dosage of five critical medication types for PD, including levodopa, dopamine agonists, monoamine oxidase-B inhibitors, catechol-O-methyltransferase inhibitors, and amantadine. Recurrent neural networks have memory blocks that retain crucial information from previous patient visits. This feature is helpful for patients with PD, as the neurologist can refer to the patient's previous state and the prescribed medication to make informed decisions. We employed data from the Parkinson's Progression Markers Initiative. The dataset included information on the Unified Parkinson's Disease Rating Scale, Activities of Daily Living, Hoehn and Yahr scale, demographic details, and medication use logs for each patient. We evaluated several models, such as multi-layer perceptron (MLP), Simple-RNN, long short-term memory (LSTM), and gated recurrent units (GRU). Our analysis found that recurrent neural networks (LSTM and GRU) performed the best. More specifically, when using LSTM, we were able to predict levodopa and dopamine agonist dosage with a mean squared error of 0.009 and 0.003, mean absolute error of 0.062 and 0.030, root mean square error of 0.099 and 0.053, and R-squared of 0.514 and 0.711, respectively.