In short, you cannot use the same size tamper for 54mm and 58mm portafilters. For using a tamper, its base dimension must match the size of the filter basket.