In short, yes.
If you have a smooth surface, the more rubber you have against the surface, the more traction you will have. By cutting grooves in the tyres, you lose some surface area meaning you lose some traction. An interview with Bridgestone's Hisao Suganuma a while back quoted him as saying that a slick tyre may well be 2 seconds a lap quicker than a grooved tyre under the same set of conditions. The tarmac has to be smooth - not like our roads - so as to get the most traction. If you have conditions such as mud, obviously tread will give you an advantage as it will 'bite' into the road giving you better traction.
However, that isn't the full story. The longer answer is, it depends on the track and the car

Any time you put a groove or a sipe into a tyre, the wear on the tyre will accelerate. The trick is to find a balance between grip and wear. You can sipe a tyre to prevent the tread surface from glazing over and becoming a slick tyre.
Soft and hard tyres will obviously also make a difference. Grooved soft tyres are normally best for qualifying or in short stints in the wet. They are best used when the track is moist and there isn't a lot of friction. This is because they wear at a much faster rate than hard tyres, so you want to minimise the wear on them. Grooves in soft tyres help to clear away dirt and rain (hence also why wet tyres have deeper grooves in them than dry tyres).
Hard tyres withstand grooving much better than soft tyres. On asphalt and similar surfaces, it is easy to run with no grooves at all. However, you can groove the shoulders of a tyre to help clean away loose dirt and moisture. You can also sipe the shoulders on hard tyres to help cars running lower tyre pressures on slick tracks. The sipes help to stop glazing and help reduce traction loss.
There are three main groove shapes which are used - square, V-shaped and sipe. Square grooves are the same width and depth all the way around. V-shaped grooves start out wide at the top and taper down to nothing. Sipes are thin slips cut by installing the blade upside down and using ends of the blade to cut slices in the tyre.
V-shaped grooves are often used where the track is expected to need more tread contact later in the race because as the tyre wears down, the grooves begin to shrink and then to disappear. Square tyres are almost the same, except that they are better on a more abrasive track. Sipes are used to make the tread more pliable. They also help to maintain a more consistent wear that helps keep the tyre uniform.
If a track gets hot, tyres may start to blister, or even melt. Grooving can help to control this by moving air across the tyres to keep the tread temps down. Grooving also increases the surface area by which heat can transfer away from the tyre. However, there is a fine balance between heat dissipation, and wear and tear on the tyre. The best balance is to groove in the centre of the tyre instead of cutting all the way across it to limit the weakening effect of the grooves. This is best because it means you have as few grooves as possible (for speed purposes) but gives a good cooling effect.