Mayonnaise can in fact be substituted for sour cream and this is often times the case with pasta salad as well as potato salad along with various types of dressings and dips. First you will need to replace the sour cream in the recipe you are looking at with mayonnaise, using completely equal amounts in order to make sure that the proportions are correct so it tastes like it should. Make sure that you mix the mayonnaise in with the rest of the ingredients thoroughly so it blends with them completely and does not stand out too much when whatever you are making is finally done.
Make sure that you cook at a low temperature in order to avoid adversely affecting the mayonnaise you are using in these recipes. When mayonnaise is heated up too much the texture can change for the worse, so you will absolutely need to make sure that you do everything in your power to prevent that from happening.
You will find that there are certain recipes where you can put in half sour cream and half mayonnaise so you do not necessarily have to substitute one for the other. It is always a good idea to make sure that you use light mayonnaise when you are substituting it for sour cream, just so you will be able to avoid adding more fat in calories to the meal than is necessary.