You have already taken the biggest step by seeing the problem and wanting to stop! It is easy as a young person to see things differently from your parents and to talk back. Tackle the problem head on as you are starting to do. Admit to your mom and dad that you sometimes say things to them that show disrespect. Tell them you are sorry about this. Then ask for their help in overcoming this habit. Most parents will deeply appreciate their son or daughter's opening up like this, and it can be the start of an open and heartfelt conversation.
The next time you are tempted to say something disrespectful, take a "time-out" and don't speak your mind. Often as humans we try to justify ourselves and are quick to reply with an emotional response. Resist the temptation. Don't give in to your emotions. Accept your parents' advice and tell them you will sincerely take it to heart. Later on think about their advice and you may see the reasons for what they told you. Your parents are bound to see your self-control and respect you even more. All of this will cause a closer and warmer relationship to develop between you and your parents.