Servitude to anyone other than God is undesirable and prohibited and similarly prostration is not permissible, if it implies glorifying and worshipping someone other than God. However, if the very prostration in front of man and to respect him is done in compliance with God's order and to fulfill His command, not only it will not be forbidden but it would be a form of servitude and obedience to the Lord as all the angels did do such a prostration.
Indeed, if Sajdah (prostration) at a particular time (e.g. the time of the advent of Islam) is no longer considered to be a sign of respect and is a symbol of worship, then in such a case it is not permissible to prostrate in front of anyone even out of respect for him. The fact that Sajdah for anyone other than God has been prohibited in some traditions is originate in the same reason, otherwise Yusuf's father and brothers prostrated before him without them having committed a sin.
You have made mention of a subject in your question that refers to a contradiction in God's commands in the sense that He, on the one hand, forbids mankind from prostrating anyone other than God, and on the other hand He Commands that the same prohibited prostration should take place!
In reply to above misgiving, we may first raise a question as follows:
If a father tell his son not to use to his car for unhealthy recreations and later he requests him to drive the car to drop a respected guest back at his home, is there any contradiction in these two sayings?! Without doubt, your answer is in the negative as there is no contradiction in these two statements of the father because the eight necessary conditions that have to be available in order for a contradiction to take place are not available. Hence, in the said case, if the son does not obey his father turning to the first request as an excuse, he is not justified and fair people would not accept his excuse.
For this reason, if God announces that a Sajdah which is a sign of worshipping is not permissible for anyone other than Me and then He commands His angels to bow down and prostrate before Adam, we should not take these two statements as contradictory to each other. In fact, disobeying Him and not fulfilling His command should be considered as an offence and we must, therefore, be sure that Iblis (the Satan) was ejected from the realm of divine servitude because of disobeying the divine command.
All what was said was based on the supposition that God forbade His creatures from prostrating for anyone other than Him before commanding the angels to prostrate. It is interesting to know that such a prohibition did not exist before and that prostration was not considered to be forbidden in the previous religions also because it was a sign of respect not worship.
It is only on this basis that the Sajdah of Yusuf's father and brothers in front of him was not considered to be abominable. There are many verses in the Holy Quran about Sajdah for God but you cannot find any verses forbidding prostration in an absolute way for anyone other than God, though it might be out of respect only. The verses that somehow imply prohibition of Sajdah for anyone than God are restricted to certain cases such as the Sajdah for the moon and the sun which may be considered as worshipping them. Later, during the advent of Islam and because Sajdah was no longer considered as a sign of respect and it had turned into a symbol of worship only, therefore the religious leaders and the infallible Imams (a.s.) forbade their followers from doing Sajdah for anyone other than God. For further information in this regard, read answer 3357 (site: 3807).
 - Yusuf, 100, "و خروا له سجدا".
 - Insan, 26; Najm, 62; Alaq, 19 etc.
 - Fusselat, 37, " لَا تَسْجُدُوا لِلشَّمْسِ وَلَا لِلْقَمَرِ وَاسْجُدُوا لِلَّهِ الَّذِی خَلَقَهُنَّ إِن کُنتُمْ إِیَّاهُ تَعْبُدُونَ "
"Do not prostrate yourselves before the sun or the moon; rather prostrate before Allah, Who created them both, if it is He Whom you worship."
 - Hurr Ameli, Muhammad bin al-Hasan, Wasail al-Shi'ah, vol.14, pg.407-408, hadith 19474, Aalulbayt Institute, 1409 A.H.