You need to get serious if you want to be taken seriously. When at work it's best to be serious because being serious is the only way to be taken seriously. Nobody takes a joker seriously so quit joking around at work.
You are a lot better off making no jokes than to make a joke and have it be misunderstood or taken the wrong way.
Keep a serious and a professional demeanor and people will respond to you accordingly. Keep it casual and people will consider you a casual employee.
Think of it this way. How would the CEO of the company act if he were here in front of you. Not only that but how do you expect him to act? Now it's time you acted the same way. If you want to get ahead, you have to be serious.