If the data is encrypted, it would not be possible to control the data type, as it would indeciferable, however, message sizes could be restricted to those near what is required by lightning. Either payments and/or proof of work could be used for spam provention.