If an officer asks you to do or search something or enter some place, it is because he does not have the right to do so without your consent.
When they have a right to do what they want, they WILL do what they want and TELL you, not ask.
That being said, when faced with a request where the officer is trying to help you, or pressure you into giving up your rights- it is always wise to answer with a "Im sorry officer, but respectfully, no". Also remember that adding ANY details or excuses or what have you simply gives them more details to work with to find a foothold to an excuse to do what they want. If they continue to push and ask questions regarding why you arent giving permission, rather than answer the question they ask, the correct response is: "Im sorry, am I being detained or taken into custody?" If they say no, "thank you, have a nice day."
If they search anyway after you said no, make sure to repeat that you are not going to get in their way, but you are respectfully refusing consent to search (watch your tone of voice!) but this time make sure you are saying it much louder so onlookers can hear.
Once again, remember this: if a cop asks to do something, they are doing so because they CANT do so without your permission. They do not ask out of politeness, and it matters little in the eyes of the law wether or not not consenting makes you look suspicious or not. You have rights.