Can I literally understand the first clause as "if a wise man is a man, then he will be useful"?
Not exactly. In "only be useful as a man", the meaning of "man" is very precise and is key to understanding what's being said. In that specific use, "man" means something like "morally courageous person". So in fact what is being said that if the wise man is useful (and that allows for the possibility that you may have a wise man who is not in fact useful), his usefulness will be precisely because he is a man, i.e. a morally courageous person.
What does "office" and "dust" mean?
Here, office means "job" or "role", and is referring to the job or role of "stopping a hole..." which in this context is seen as something quite low and not very demanding in terms of moral courage. And then dust means his lifeless remains after he -- the moral being, the man -- has died and departed.
So what is being said is something like this.
A wise man is truly useful not because he is wise, but rather precisely because he is "a man", i.e. morally courageous. And an essential part of that moral courage lies in not allowing himself to be moulded (i.e be clay) according to other people's beliefs. Furthermore, he will not avoid difficult decisions by, for example, simply ignoring problems or applying a quick but ineffective fix ("stop a hole to keep the wind away"). A moral man would not stoop to do a job that involved such low and dishonorable behavior. Instead, he would rather leave that kind of job -- that "office" -- to his own corpse, when he had become mere dust.
Does the second clause make the "not...but..." construction?
I'm not sure about this one. Does the above answer it?