Not really? It is possible, but it would require both different reforms and possibly a different series of conquests by Rome and possibly even other powers.
A phalanx is more than just issuing a pile of pikes to infantry. The cavalry arm was crucial to its success. The phalanx had its role in holding the line, but it was the heavy cavalry (the Companions, the Thessalians and, eventually, the other formations that emerged such as the Cataphracts) that was the deciding arm of the war.
Rome had cavalry, of course. It was ... decent, but far from the key part of their military. A cavalry arm is expensive and land in Italy wasn't the best suited for raising large numbers of horses (Northern Italy can sustain it, but for the formative years of the Republic, that area was controlled by Cletic tribes). That flaw was immaterial by the point Rome started to truly clash with the Successors - their own cavalry arms had withered and the incessant warfare had left them strapped for funds. An attempt by Rome to adapt a phalanx would require a strong cavalry arm. Without one, you're left with an even more unwieldly version of the hoplite phalanx.
Maybe if Alexander lives longer and pursues his planned Italian and African campaigns? But then we're looking at a very different Rome from history, one which might well turn out to be unrecognizable. Though Rome joining the Successor thunderdome as one of the Successors would be interesting.