You could probably work something out from etymology, but generally speaking no, except this can only happen for unstressed vowels. Russian spelling is mostly morphological, so a good rule of thumb for stem vowels is to try and find a word that has the vowel in question stressed, though this isn’t always possible. For prefixes and suffixes you’ll just have to remember a list.
The reason for the confusing spelling is that the vowel that confuses you isn’t [a] or [o] but [ɐ]what? or maybe even the familliar English [ə],what? and vowel phonemes /a/ and /o/ both produce that sound when they undergo reduction in an unstressed position after a hard consonant. This can happen a bit differently in different places: for example, in downtown Moscow you’re more likely to hear a well-articulated [ɐ], whereas moving to the suburbs just 30 kilometers away will get you a much shorter, almost unpronounced sound. Russian speakers usually perceive this as Muscovites emphasising the ah sound, hence аканье “ah-ing”, but the reality is that the sound is always the same, it’s just that the reduction in Moscow is not that strong. Furthermore, in Northern European Russia (the stereotypical example being the city of Vologda) the merger is in fact absent and an unstressed /o/ still sounds oh-ish, hence оканье “oh-ing”. (I hear that the schoolchildren there are quite amused by textbooks that teach them to avoid a spelling mistake that’s impossible to make in their dialect.)
Finally, there’s always Belarusian, which is rather close to Russian, but has its spelling organized completely differently, so you can always spell ⟨а⟩ for unstressed /a/~/o/ there :)
Оis the most basic rule in Russian phonetics – Баян Купи-ка Feb 12 '19 at 12:27