Dear Aryan Warrior,
The question " Did the Prophet Muhammad talk to God?". I would like to rephrase the question "Did the Prophet Muhammad communicated with God?",
My answer is YES. I used the word communicated to indicate that the spectrum of information two way transfer between God and the Prophet is wide.
Talking while awake, talking in dreams , talking in a trance et can therefore be taken as talking to to God ( a two way conversation).
In the most simplistic way, the istkharah prayer (solat) is a means of communiaction between a Believer and God. The Believer ask the question (to his or her problem say) during the Solat and then wait for an answer . Here the Believer asked ("talk" to) God, and he gets an answer later in the form of dreams, signs etc.
Of course there are other more direct means. Even in the Quran, God said he will answer a , if he were to ask.
Salam