Is possible to rebuild an heap simply by using :
alter table tt rebuild partition=all(x) ,
avalaible in Sqlserver 2008, online operation.
In SqlServer2005 is possible to use my script , published on sqlservercentral, rebuild_partition .
It should work for a nonpartitioned table giving there partition_number=1
Another method is to create a clustered index on the table, then dropping the index
Federico Iori