The Rambam, in the first lines of his introductions to both Perush Hamishnayos and Yad Hachazakah, states explicitly that all of the mitzvos were given by Hashem to Moshe, and then taught by Moshe to the Jewish People, "with their interpretations." In Perush Hamishnayos, he gives the mitzvah of sukkah as an example - the posuk says בסוכות תשבו שבעת ימים, and Moshe was given the details: only men are obligated in sukkah, women and sick people and travelers are not, the schach has to be made of plant matter, etc.
He also goes on to say:
וכאשר מת ע"ה, אחר שהנחיל ליהושע מה שנאצל עליו מן הפירוש, והחכים והתבונן בו יהושע ואנשי דורו, וכל מה שקבל ממשה, הוא, או אחד מן הזקנים, אין לדבר עליו ולא נפלה בו מחלוקת. ומי שלא שמע בו פירוש מפי הנביא ע"ה, מן העניינים המשתרגים מהם, הוציא דינים בסברות, במידות השלש עשרה, הנתונות על הר סיני, שהתורה נדרשת בהם. ובאותם הדינים שהוציאו יש דברים שלא נפלה בהן מחלוקת אבל הסכימו עליהם, ויש מהם מה שנפלה בו מחלוקת בין שתי דעות, זה אומר בכה וזה אומר בכה, וזה סובר סברה ונתחזקה לדעתו, וזה סובר סברה ונתחזקה לדעתו, כי מידות ההיקש שעל דרך התוכחת יקרה בסברותיהם המקרה הזה. וכשהייתה נופלת המחלוקת היו הולכים אחרי הרוב, כמו שנאמר, אחרי רבים להטות
the gist being that all halachos were known in Yehoshua's time and later: some of them had been transmitted by Moshe, others were derived using the 13 Middos and unanimously agreed to by the Sages, and still others were decided by majority vote.
A lot of the machlokos of later times concern what engineers call "corner cases." Take your example of the argument of Beis Hillel and Beis Shammai about yibum (I assume you mean the one about צרת הבת), then consider among other things: (a) how often is yibum needed in the first place, (b) how often was the deceased married to his niece or some other woman who would be an ervah to his brother, (c) how often would the one to whom she's an ervah be the only brother available for yibum, etc. - and the result is that the case probably was a rarity that wouldn't make a difference to 99.9% of marriages. (Also, the Gemara in Yevamos 13b-14a brings the opinions of Reish Lakish and Rav that Beis Shammai never actually acted in accordance with their opinion anyway.) (If instead you meant their machlokes about whether kiddushin requires a shaveh prutah or a shaveh dinar - there too, most people probably used a larger amount anyway, just as nowadays few people do kiddushin with a 25-cent ring.)
With some halachos, too, it may have been the case that the instructions given to Moshe allowed for more than one way of doing things. An example (according to Rav Hai Gaon) is the three types of teruah (shevarim, teruah, or both together): each one, he says, is a valid form of teruah, but eventually the Chachamim (specifically, R' Abahu in Rosh Hashanah 34a) decided to make it uniform for everyone. (The Rambam, notably, disagrees about that one: he says that there was only one original form of teruah, but it was forgotten over time, and so different minhagim developed. It's worth bearing in mind that we're used to hearing shofar only during Elul-Tishrei, but in earlier times the shofar was used for other purposes too, such as an alarm, and of course for that they didn't necessarily have to blow according to any particular sequence. So it's plausible enough that people may have confused one shofar sound with another.)