The gemara says that there was enough room on the head of Dovid Hamelech to wear both the crown and tefillin because there is enough space on the head for two tefillin. Rashi strangely focuses on there being enough space for two straps to encircle the head, rather than focusing on the actual boxes of the tefillin It seems that rashi does this due to the context of the sugya that requires space on the head for the entire crown to encircle the head and have the tefillin, so there must be space for two tefillin to entirely circle the head. However, Tosafos in Eruvin 95a explains that it would certainly be true of the boxes because the kohen gadol wore the tzitz not on his forehead but on the place of tefillin, yet there was also space for tefillin between the tzitz and the hat - clearly there is space for two pair of tefillin one behind the other.
From Tosafos it seems that the space for two tefillin would only be one behind the other but not one adjacent to the other. This would conform with the assumption that the tefillin must be perfectly centered, which would obviously not be possible if one wore two tefillin adjacent to one another. However, the Beis Yosef interpreting the Rambam seems to understand that there is space for two pair of tefillin even one next to the other. This seems to be the assumption of the divrei chaim (sanz) - see here - who holds that the tefillin need not be perfectly centered (which would explain many gedolim pictures!). The editor of the divrei chaim strangely attributes his comment that insistence on the tefillin being perfectly centered is דברי בורות - words of a bor, to be the nesivos who says that it shouldn't be moved to this side or that. But, in actuality the source of this ruling is the Shulchan Aruch Ha'rav (Gra"z) 27:18 - צריך לכוין הקציצה שתהא באמצע רוחב .הראש כדי שתהא כנגד בין העינים It is the ruling of the Ba'al Hatanya that the divrei chaim refers to as "divrei boros".