First of all it should be clear that Adderall is a Schedule II drug under the Controlled Substance Act and is a violation of Federal law to take it without a prescription from a physician. Amphetamines can have serious side effects and lead to addiction, and the Torah does not expect you to significantly risk your health for the sake of learning. I will assume you are taking this potent drug under the consultation of a qualified and reliable doctor.
Regarding Hilchos Shabbos; while generally medicines may not be taken on Shabbos, however this only applies when they are treating an ailment. A pill that is being used to enhance performance is not included in the issur and therefore it seems to be mutar similar to a caffeine pill. However, since Adderall is primarily used to treat ADHD, which may be considered an illness, it is not so clear. An additional lenient factor in your case would be that some Poskim permit taking any medicine for a mitzva, although most do not. Ideally the extended release form of Adderall could be taken before Shabbos begins, and there would be no issues of Hilchos Shabbos.